// 顶部导航菜单 用tabs实现
<template>
  <el-row class="agent-main">
    <nav-header></nav-header>
    <app-main></app-main>
    <!--底部公告栏-->
    <el-row class="noticeBottom">
      <el-col :span="23">
        <router-link to="/notice">
          <marquee class="noticeBottom_info" scrollamount="2">{{notice}}</marquee>
        </router-link>
      </el-col>
      <el-col :span="1">
        <router-link to="/notice">更多</router-link>
      </el-col>
    </el-row>
  </el-row>
</template>

<script>
import AppMain from './AppMain'
import NavHeader from './NavHeader'

export default {
  name: 'AgentLayout',
  data() {
    return {
      notice: '', // 弹窗公告
    }
  },
  methods: {
    GetNoticesList() {
      this.$store.dispatch('GetNoticesList')
        .then(response => {
          for (const key in response.data) {
            this.notice = response.data[key].content
            break
          }
        })
    },
  },
  components: {
    AppMain,
    NavHeader,
  },
  computed: {},
  async created() {
    this.GetNoticesList()
    // await this.$store.dispatch('GetAllGames', {})
    // await this.$store.dispatch('GetDefaultHandicaps', {})
    // await this.$store.dispatch('GetDefaultGameCategory', {})
  },
}
</script>

<style scoped>
.agent-main {
  min-width:1400px;
  height:100%;
  padding-bottom: 50px;
}
  .noticeBottom{
    width: 100%;
    bottom:0;
    position: absolute;
    overflow: hidden;
    right: 0;
    min-width: 1225px;
    top:auto;
    background: url(/static/agent/img/marquebg.png) repeat-x;
    border-bottom: 1px solid #B5C6E2;
    border-top: 1px solid #B5C6E2;
    color: #3F559D;
    line-height: 27px;
    height: 27px;
    text-indent: 3px;
  }
 .noticeBottom_info{
    width: 100%;
    margin: 0!important;
  }
</style>
